package com.gxjc.action;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import com.gxjc.model.Crop;
import com.gxjc.service.CropService;
import com.opensymphony.xwork2.ActionSupport;

public class CropAction extends ActionSupport {
	@Resource
	CropService cropService;
	public String name;
	public Integer id;
	public List<Crop> list = new ArrayList<>();
	public CropService getCropService() {
		return cropService;
	}
	public void setCropService(CropService cropService) {
		this.cropService = cropService;
	}
	
	public String getAll(){
		list = cropService.getAll();
		return "success";
	}
	public List<Crop> getList() {
		return list;
	}
	public void setList(List<Crop> list) {
		this.list = list;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
}
